#ifndef FND_GAME_2D_GAME_MAP_MOVER_HPP
#define FND_GAME_2D_GAME_MAP_MOVER_HPP
#include "tile_actor.hpp"
#include <vector>
namespace FndGame2D {
  class game_graph ;
  class  game_map_mover : public quad_actor {
  public:
    static const std::string BIND_MAP ;
    static const std::string SET_MOVE_INIT_POS ;
  public:
    explicit game_map_mover(float move_speed = 0.15f, 
			    const std::string& name = std::string(), int draw_level = 0,
			    const mover::position_type& p = mover::position_type(),
			    float angle = 0.0f,
			    game_graph* g_graph = 0) ;
    int step()const {return m_max_step ;}
    void set_step(int step) {m_max_step = step ;}

  private:
    bool handle_bind_map_message(const normal_thinker_message_type& msg) ;
    bool handle_init_move_state_message(const normal_thinker_message_type& msg) ;
    void update_move(float time_elapsed, unsigned long id) ;
    //about move in the map
    void update_move_state(float time_elapsed) ;
    bool is_finished_move() ;
    game_graph* m_graph ;
    size_t m_current_move ;
    float m_move_speed ;
    float m_current_move_time ;
    int m_max_step ;
    int m_pos_id ;
    std::vector<size_t> m_moves ;
  } ;
}
#endif
